package cn.smile.controller.core;

import cn.smile.bean.dto.core.NotebookCount;
import cn.smile.business.core.IHomeService;
import cn.smile.commons.response.MyResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/home")
public class HomeController {

    @Resource
    private IHomeService service;

    @GetMapping(value = "countNotebook")
    public MyResult<NotebookCount> countNotebook() {
        return MyResult.OK(service.countNotebook());
    }
}
